from sys import *

def write_path_file(path_number,tag,path_length): 
    filename = argv[1][:-4]
    #filename = 'scenery1.2000'
    with open ('.\path\%s.txt'%(filename + tag),'w') as f:    
        f.write("NAME:%s\n"%(filename + tag))
        f.write("COMMENT : Length = %d\n"%path_length)
        f.write("COMMENT : Found by %s\n"%tag)
        f.write("TYPE : TOUR\nDIMENSION : %s\nTOUR_SECTION\n"%filename[-4:])
        for i in path_number:
            f.write(str(i)+'\n')
    return